package com.huawei.appmarket.service.store.orderappbigimage;

import android.content.Context;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.LinearLayout;
import android.widget.LinearLayout.LayoutParams;
import android.widget.RelativeLayout;
import androidx.annotation.NonNull;
import com.huawei.appmarket.service.store.awk.card.HorizontalBigImgItemCard;
import o.cdr;
import o.cih;
import o.eib;
import o.ewm.h;

public class OrderAppBigImgNode extends cdr {
    public OrderAppBigImgNode(Context context) {
        super(context, 1);
    }

    public int ˏ() {
        return HorizontalBigImgItemCard.ॱˊ();
    }

    public boolean ॱ() {
        return false;
    }

    public boolean ˊ(ViewGroup viewGroup, ViewGroup viewGroup2) {
        if (viewGroup == null) {
            return false;
        }
        LayoutInflater from = LayoutInflater.from(this.ॱ);
        LinearLayout ॱ = ॱ(viewGroup);
        for (int i = 0; i < ˏ(); i++) {
            cih orderAppBigImgCard = new OrderAppBigImgCard(this.ॱ);
            RelativeLayout relativeLayout = (RelativeLayout) from.inflate(h.ˉॱ, null);
            orderAppBigImgCard.ˏ(relativeLayout);
            ˊ(orderAppBigImgCard);
            ॱ.addView(relativeLayout, new LayoutParams(0, -1, 1.0f));
        }
        return true;
    }

    @NonNull
    private LinearLayout ॱ(ViewGroup viewGroup) {
        int ॱॱ = eib.ॱॱ();
        int ʽ = eib.ʽ();
        int ˊ = eib.ˊ();
        int ᐝ = eib.ᐝ();
        int ˏ = eib.ˏ();
        if (ˋ(viewGroup)) {
            LinearLayout linearLayout = (LinearLayout) viewGroup;
        } else {
            View linearLayout2 = new LinearLayout(this.ॱ);
            linearLayout2.setOrientation(0);
            viewGroup.addView(linearLayout2, new LayoutParams(-1, -1));
            viewGroup = linearLayout2;
        }
        viewGroup.setPadding(ॱॱ, ˊ, ʽ, ᐝ);
        viewGroup.setDividerPadding(ˏ);
        return viewGroup;
    }

    private boolean ˋ(View view) {
        return view != null && (view instanceof LinearLayout) && ((LinearLayout) view).getOrientation() == 0;
    }
}
